# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Sören Tempel <soeren+alpine@soeren-tempel.net>
pkgname=rlwrap
pkgver=0.45.2
pkgrel=1
pkgdesc="readline wrapper"
url="https://github.com/hanslub42/rlwrap"
arch="all"
license="GPL-2.0-or-later"
makedepends="readline-dev ncurses-dev automake autoconf libtool"
subpackages="$pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/hanslub42/rlwrap/archive/v$pkgver.tar.gz"

prepare() {
	default_prepare
	autoreconf -fi
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
77664bc17c4e6148037b8ae64c025b07c3feae91dfeff59f1846ce38e5f808a41005286daa81fd0ed01e0c789762e377cc48e6abdf124a7d4654f66b2b6c6cc4  rlwrap-0.45.2.tar.gz
"
